<template>
  <div>
    <ul v-for="item in b" :key="item.key">
      <li v-for="i in item.child" :key="i"><p>{{i}}</p></li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "WritingHome",
  data () {
    return {
      a: [{
        title: 'image',
        row: 1,
        url: 'http://www.ai-god.com:8081/static/Thumbnail/1.jpg',
        info: '信息1'
      },
        {
          title: 'video',
          row: 1,
          url: 'http://img.yopoo.cn/banner_video.mp4 ',
          id: 0,
          pic: ""
        },
        {
          title: 'code',
          row: 2,
          url: 'http://www.ai-god.com:8081/static/Thumbnail/1.jpg',
          percentage: 60,
          status: '',
          id: 0,
          info: '信息2'
        },
        {
          title: 'video',
          row: 2,
          src: 'http://img.yopoo.cn/banner_video.mp4 ',
          id: 1,
          pic: "",
        },
        {
          title: 'video',
          row: 3,
          src: 'http://img.yopoo.cn/banner_video.mp4 ',
          id: 2,
          pic: "",
        }]
    }
  },
  computed: {
    b () {
      const b = []
      const a = this.a
      for (let i = 0, l = a.length; i < l;) {
        b.push({child:[a[i++], a[i++]]})
      }
      console.log(b)
      return b
    }
  }
}
</script>

<style scoped>

</style>